package com.ma.mapper;

import com.ma.entity.Doctor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ldc
 * @since 2023-08-28
 */
@Mapper
public interface DoctorMapper  {
    @Select("select * from doctor")
    public List<Doctor> findAll();

    @Select("select * from doctor where name = #{username}")
    public Doctor getByUserName(String username);

    @Select("select * from doctor limit #{start},#{size})")
    List<Doctor> selectDoctorByPage(int pageNum,int pageSize);

    @Delete("delete from doctor where id=#{id}")
    public int delDoctorById(int id);
}
